﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public static class TextExport
{
    public static int GetTextComponent(int nodeWindowId)
    {
        GameObject obj = WindowMgr.Instance.Get(nodeWindowId);
        if (obj.GetComponent<Text>() != null)
        {
            return WindowMgr.Instance.Add(obj);
        }
        return WindowMgr.INVALID_ID;
    }

    public static void SetText(int windowId,string content)
    {
        GameObject obj = WindowMgr.Instance.Get(windowId);
        Text text = obj.GetComponent<Text>();
        if (text != null)
        {
            text.text = content;
        }
    }
}
